Silver Platform
TPT supports the test execution on Silver, a simulation tool of the company Synopsys.
Prerequisites to use TPT with Silver:
- TPT must be installed. By default, the installation directory is
C:\Program Files\TPT-{Version Number}\
, referred to as<tpt-install-dir>
. - Silver must be installed. Analogously, the installation directory for Silver will be referred to as
<silver-install-dir>
.
Silver Project Setup
To test Silver Projects with TPT, you have to add a test driver module (the TPT-VM) to the Silver Project. A new module has to be included, which can be found at<tpt-install-dir>\tptplugins\silver\tpt32_vm.dll
. The module requires two parameters:
- The path to the compiled test case in the TPTVM format (it can be found in the corresponding test data directory as
testcase.tvm
). - The path to the TPTBIN result file where all recorded data shall be stored for the subsequent automatic assessment (also in the corresponding test data directory as
testcase.tptbin
).
For simple configuration and automatic test execution, it is recommended to use Silver environmental variables, for example TPTVM, SCENFILE, RECFILE:
These variables can be handled by TPT to correctly configure the Silver project for each test execution.
Silver Platform Setup
To use TPT with Silver, you have to create and configure a Silver Platform in TPT. First, add a new Silver Platform, then configure it.
System constants can be used in the platform configuration, see Signal Types - Constant.
VM settings
Step size
Specifies the sampling time. A constant time between one simulation step and the subsequent one.
Timeout
Specifies the maximum test execution time before the VM stops the test execution.
History size
Specifies the number of time steps that were held and were accessible in the past during the test execution.
Mapping
A mapping, for example imported from an A2L file, that contains a Rename mapping flavor. Then TPT will use the external names provided by this mapping flavor in Silver. If no mapping is given, TPT assumes that Silver and TPT variable names are equal.
Silver directories
Working directory
The working directory for Silver. All relative paths in Silver are relative to this directory.
Silver startup command
To call the Silver simulation tool. This command is executed for each test case. Use the following arguments:
Once the Silver Platform is configured, an interface needs to be defined either using the Declaration Editor or by importing the interface from an A2L file (Tools|Import|A2L).
Once the Silver Platform and the interface are ready, you can execute test cases in TPT. For each test case, a Silver instance is started.
In Silver, place the TPT node tpt32_vm.dll
a way that all its input and output dependencies are fulfilled. That is, all nodes that provide input to TPT have to be executed before the TPT node. Only those nodes that modify TPT outputs in the same cycle should be placed behind. In most cases, it is suitable to place the TPT node at the end.
Enter the additional command -l test.log
to make Silver create a log for each test file.
Silver Platform Additional Notes
The Silver GUI always wins. It is recommended to disable it for testing with TPT. TPT waits for the Silver simulation to finish. Therefore, choose an adequate platform time out.